<?php
	require 'libraries/SampleEntryLib.php';
	require 'libraries/CostLib.php';
	require 'libraries/UserLibrary.php';
	
	isSessionSet("administrator", null, "index.php");
?>

<html>
	<head>
	<title>CASLIMS | View Sample Detail</title>
	<link rel="stylesheet" type="text/css" href="scripts/page.css" />
	<link href="tools/favicon.ico" rel="shortcut icon" type="image/x-icon" /> 
	<script type = "text/javascript" src="scripts/samplelib.js">
	</script>

	<!--
		Information about a sample include: 
		sampling date, 
		who submitted the sample, 
		type of sample (water, food, feed, soil, plant, and others), 
		type of sample, 
		analysis required (see other worksheet), 
		date submitted, 
		who received the sample, 
		and remarks. 
	-->
	
	</head>
	<body>
		<div id="header"></div>
		<div id="wrapper">
			<div id="pagetop">
				<div class="greeting">Hi, <?php echo $_SESSION["administrator"];?> | <a href="Logout.php">Log out</a> | <a href="AdministratorHomepage.php"> Home </a></div>
				<div class="homepage"><?php echo $_SESSION["administrator"];?></div>
			</div>
				<form name = "addSample" action = "ProcessAddSample.php" id = "main-form" method = "post">
				<input type = "hidden" name = "counter" id = "counter" value = "1">
				<table id = "1" border="1" align="center" width="100%">
					<tr>	
						<td>
							<input name="deletesample" type="button" value="Delete Sample"  onclick="deleteSample()" id="101"/> 
						</td>
					</tr>
						<tr>
							<td>
								<table>
									<tr>
										<td>Sampling Date:</td>
										<td>
											<input type="text" name="samplingdate" id="samplingdate"/>
											<div id="samdate"></div>
										</td>
										<td>Remarks:</td>
									</tr>
									<tr>
										<td>Sample submitted by / Signature:</td>
										<td>
											<input type="text" name="samplesignature" id="samplesignature" onkeypress="return onlyAlphaNum();"/>
											<div id = "sample"></div>
										</td>
										<td rowspan="5"><textarea name = "remarks" id="remarks" rows="15" cols="70"></textarea></td>
									</tr>
									<tr>
										<td>Type of Samples:</td>
										<td>
											<select id = "mainTypes" name = "mainTypes[]" onchange = "change()">
												<option value="water">Water</option>
												<option value="food">Food</option>
												<option value="feed">Feed</option>
												<option value="soil">Soil</option>
												<option value="plant">Plant</option>
												<option value="other">Others...</option>
											</select>
											<input type = "text" name = "othersField" id = "othersField" disabled="disabled"/>
										</td>
									</tr>
									<tr>
										<td>Analysis Required:</td>
										<td>
											<select id = "subTypes" name = "subTypes" onchange = "showSampleType(this.value,1)">
												<option value="blank">---</option>
												<option value="Proximate Analysis">Proximate Analysis</option>
												<option value="carbohydrates">Carbohydrate Analysis</option>
												<option value="minerals">Mineral Analysis</option>
												<option value="fatsandoils">Fats and Oils</option>
											</select>
											<div id="here1"></div>
											<div id="error_check"></div>
										</td>
									</tr>
									<tr>
										<td>Date Submitted:</td>
										<td>
											<input type="text" name="datesubmit" id="datesubmit"/>
											<div id = "datesub"></div>
										</td>
									</tr>
									<tr>
										<td>Sample received by:</td>
										<td>
											<input type="text" name="samplereceive" id="samplereceive" onkeypress="return onlyAlphaNum();"/>
											<div id = "samreceived"></div>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					<tr>
						<td>
							<input type="button" value="More Samples" name="addsample" onclick="newSample()" id="addsample"/> 
						</td>
					</tr>
					</table>
							<input type="submit" value="Add Sample(s)" name="imdone" id="imdone"  onclick="return checkFields()"/>
				</form>
			<div id="footerwrap">
				<div id="footer"> 
					<div class="copyright">Copyright 2011.<a>CASL BIOTECH-UPLB.</a> All Rights Reserved.<br/> 
				Arianne Buse&ntilde;os | Darlene Joy Masong | Rick Jason Obrero | Jonathan Pandi | Jonathan Simbahan | Emmanuel Soriano 
					</div> 
	    	    </div>
			</div>				
		</div>			
	</body>
</html>